a = require "../db/Certificate"
console.log a
Certificate = {
  name: "app1",
  company:"abc",
  description:"证书描述",
  download:"123",
  user_id: 12
}
conditions = {

}
# a.save Certificate, (err, obj, c) ->
#   console.log obj


# a.list 1, 2, "",  (a, b) ->
#   console.log JSON.stringify b
#   console.log JSON.stringify a

# a.findAll (err, data) ->
#   console.log err
#   console.log JSON.stringify data

# a.findOneAndUpdate _id: '57b41ace9f4a0aca46bb510f', {download: 'w'}, (err, data) ->
#   console.log err
#   console.log data

a.findOneAndRemove _id: '57b41a189f4a0aca46bb510d', (err, obj) ->
  console.log 2
  console.log err
  console.log obj
